package com.ttxs.generator.util;

import java.io.File;

public class PathUtils {
    public enum Java {
        srcMainJava,
        resources,
        mapperXml;
    }
    public enum Vue {
        views,
        router,
        menu,
        api;
    }

    public static String get(Vue pathType, String vueProjectPath) {
        StringBuilder builder = new StringBuilder(vueProjectPath)
                .append(File.separator).append("src")
                .append(File.separator);
        switch (pathType) {
            case api:
                return builder.append("api").toString();
            case menu:
                return builder.append("data").append(File.separator).append("menu").toString();
            case views:
                return builder.append("views").toString();
            case router:
                return builder.append("router").toString();
        }
        return "";
    }

    public static String get(Java pathType, String javaProjectPath) {
        StringBuilder builder = new StringBuilder(javaProjectPath)
                .append(File.separator).append("src")
                .append(File.separator).append("main")
                .append(File.separator);
        switch (pathType) {
            case mapperXml:
                return builder.append("resources").append(File.separator).append("mapper").toString();
            case srcMainJava:
                return builder.append("java").toString();
            case resources:
                return builder.append("resources").toString();
        }
        return "";
    }
}
